<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('attraction', function (Blueprint $table) {
            $table->comment('景区表');
            $table->bigIncrements('id');
            $table->string('name', 64)->nullable(false)->comment('景区名称');
            $table->string('intro_title', 128)->nullable()->comment('景区介绍标题');
            $table->longText('intro')->nullable()->comment('景区介绍');
            $table->string('cover_id', 64)->nullable()->comment('封面Id');
            $table->string('address')->nullable()->comment('地址');
            $table->string('phone')->nullable()->comment('联系电话');
            $table->string('open_time')->nullable()->comment('开门时间');
            $table->string('close_time')->nullable()->comment('关门时间');
            $table->integer('status')->nullable(false)->default(0)->comment('状态1-正常 2-关闭');
            $table->datetimes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('attraction');
    }
};
